package com.wxyzz.satserver.recharge.controller;


import com.wxyzz.common.core.common.R;
import com.wxyzz.satserver.recharge.param.BuyParam;
import com.wxyzz.satserver.recharge.service.BuyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/order/buy")
@Api(tags ="业务订单api")
@CrossOrigin
public class BuyController {

    @Resource
    private BuyService rechargeService;

    /**
     * 添加充值订单
     *
     * @param param
     * @return
     */
    @PostMapping("/add")
    @ApiOperation(value = "支付的同步回调")
    public R addBuy(@RequestBody BuyParam param) {
        String orderNo = rechargeService.addRecharge(param);
        return R.ok(orderNo);
    }
}
